﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace WCS.Infrastructure.EFCore;

/// <summary>
/// 线路打卡记录表
/// </summary>
[Table("LinePunchRecord")]
public partial class LinePunchRecord
{
    /// <summary>
    /// 打卡Id
    /// </summary>
    [Key]
    [StringLength(32)]
    public string Id { get; set; } = null!;

    /// <summary>
    /// 用户Id
    /// </summary>
    [StringLength(32)]
    public string UserId { get; set; } = null!;

    /// <summary>
    /// 线路Id
    /// </summary>
    [StringLength(32)]
    public string LineId { get; set; } = null!;

    /// <summary>
    /// 开始时间
    /// </summary>
    [Column(TypeName = "timestamp without time zone")]
    public DateTime? StartTime { get; set; }

    /// <summary>
    /// 完成时间
    /// </summary>
    [Column(TypeName = "timestamp without time zone")]
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 扩展属性（JSON文本）
    /// </summary>
    public string? ExtraProperties { get; set; }

    /// <summary>
    /// 并发标记
    /// </summary>
    [StringLength(40)]
    public string? ConcurrencyStamp { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column(TypeName = "timestamp(6) without time zone")]
    public DateTime CreationTime { get; set; }
}
